home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / earkit / news / thor / hd-install / installthor < prev    next >
Text File  |  1998-05-24  |  54KB  |  1,864 lines

  1. ; $Id: InstallThor 1.6 1997/08/26 02:43:57 pettern Exp pettern $
  2. ;*************************************************************************
  3. ;    Title:
  4. ;        InstallThor
  5. ;*************************************************************************
  6. ;    Description:
  7. ;        Commodore Installer Script for the Thor software
  8. ;*************************************************************************
  9. ;    Author:
  10. ;        Øyvind Ellefsen - versions for THOR upto 1.22
  11. ;       Petter Nilsen   - versions for 1.25 ->
  12. ;          - parts borrowed from the Demon ISP installer for THOR 2.3
  13. ;            created by Neil Bothwick <neil@wirenet.u-net.com>
  14. ;          - intro borrowed from Robert Reiswig's CyberGfx installer
  15. ;*************************************************************************
  16. ;    Still to do:
  17. ;        - Show .readme file
  18. ;        - Warn against MultiUser
  19. ;       - Make sure all dirs are present before copying files
  20. ;
  21. ;*************************************************************************
  22. ;
  23. ;******************************************************
  24. ;***** SET UP OUR VARIABLES AND OTHER SUCH STUFF ******
  25. ;******************************************************
  26.  
  27. ; some useful variables
  28.     (set 
  29.         true             1
  30.         false             0
  31.         yes             true
  32.         no                 false
  33.         is_a_file         1
  34.         is_a_dir         2
  35.         quote             "\""
  36.         newline         "\n"
  37.         tick             "'"
  38.         nothing         ""
  39.         dldirproblem    0
  40.         bbspack         0
  41.         inetpack         0
  42.         #inetpackname     "thor25_inet.lha"
  43.         #bbspackname     "thor25_bbs.lha"
  44.         #arexxpackname     "thor25_arexx.lha"
  45.         #version        "THOR 2.5"
  46.         tcptype         0
  47.         uucptype         0
  48.         cpu             (database "cpu")
  49.         cpu020             (and (<> cpu "68000") (<> cpu "68010"))
  50.         v39             (>= (/ (getversion "exec.library" (resident)) 65536) 39)
  51.  
  52.         #installtext    (cat "This section of the installation is dedicated "
  53.                             "to some first-time parameters that THOR "
  54.                             "needs to have configured.\n\n"
  55.                             "Select YES if you want to continue with this "
  56.                             "configuration, otherwise NO")
  57.  
  58.         #endtcpcfgtext    (cat "After this installation is complete, please read the introductory mail "
  59.                             "waiting for you in THOR.")
  60.  
  61.         #endtext        (cat "Hope you like THOR! Do not hesitate to "
  62.                             "send us comments, bugreports and suggestions.\n\n"
  63.                             "Check out http://www.thule.no/ for updates and news, "
  64.                             "and consider subscribing to one of the mailing lists for "
  65.                             "THOR that are now operational. See the readme file included "
  66.                             "with this distribution for details."
  67.                         )
  68.  
  69.     )
  70.  
  71. ; some useful procedures
  72.     ; change userlevel to expert
  73.     (procedure expert_level
  74.         (
  75.             (user 2)
  76.         )
  77.     )
  78.  
  79. ; reset userlevel back to default
  80.     (procedure default_level
  81.         (
  82.             (user default-level)
  83.         )
  84.     )
  85.  
  86. ; store off userlevel
  87.     (procedure save_default_level
  88.         (
  89.             (set default-level @user-level)
  90.         )
  91.     )
  92.  
  93. ; some overused strings
  94. (set #omp (cat "One moment please..." newline))
  95.  
  96. (set #classact "\n\n\nThe following is the default Install/Update Installer\n\nProcedure for placing ClassAct on your System.")
  97.  
  98. ;********************************************************************
  99. ; ClassAct Install/Update Default Procedure by:
  100. ; Osma Ahvenlampi - Osma.Ahvenlampi@hut.fi
  101. ;********************************************************************
  102. ; I have disabled the (complete) settings
  103. (working #classact)
  104. ; ************* PLEASE COPY THIS PROCEDURE ALONG WITH THE STRINGS IT USES 
  105. ; ************* TO THE INSTALLER SCRIPT OF YOUR CLASSACT APPLICATION.
  106. ; ************* IT WILL TAKE CARE OF INSTALLING THE CLASSACT CLASSES YOU
  107. ; ************* PROVIDED WITH YOUR APPLICATION TO THE USER'S SYSTEM.
  108.  
  109. ; $VER: ClassAct_Install 1.10 (21.1.97) by Osma Ahvenlampi
  110.  
  111. (set cpu (database "cpu"))
  112. (set cpu020 (and (<> cpu "68000") (<> cpu "68010")))
  113. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  114.  
  115. ; percentage of the size of included ClassAct classes versus the whole
  116. ; distribution (ie. total "complete" percentage after ClassAct is installed)
  117. (set classact-complete 50)
  118.  
  119. ; ClassAct installer scripts
  120. (if (= @language "español")
  121. ; SPANISH CLASSACT INSTALLATION STRINGS
  122. (
  123. (set #classdest-prompt "Por favor, seleccione el directorio donde desea instalar las clases de ClassAct.\n(Vea la ayuda para más detalles)")
  124. (set #classdest-help (cat "ClassAct es un kit de interface gráfica consistente es clases compartidas BOOPSI.\n\nAlgunos programas requieren que algunas o todas de las clases de ClassAct estén instaladas en su sistema. "
  125.     (if v39 (cat "El OS 3.0 tiene un directorio estándar para las clases BOOPSI: el directorio SYS:Classes. Se recomienda que instale ClassAct ahí.")
  126.             (cat "El OS 2.0 no tiene un sitio estándar para las clases BOOPSI residentes en disco. En el OS 3.0 esas clases son almacenadas en el directorio SYS:Classes. Se recomienda que cree este directorio e instale ClassAct ahí.\nEste directorio debe ser añadido a la asignación de LIBS:. Esto puede ser hecho colocando el comando\nAssign >NIL: LIBS: SYS:Classes ADD\nal User-Startup. Este instalador lo hará por usted.")
  127.         )
  128.     )
  129. )
  130. (set #classes-020 "¿Quiere usar la versión optimizada para OS 3.0 y 020 de ClassAct?")
  131. (set #help-020 "Algunas librerías de ClassAct tienen versiones optimizadas para el uso en máquinas con OS 3.0 y 020 o superior. Si su Amiga es una de tales máquinas debería instalar estas. Las versiones 68000/2.0 también funcionarán, pero son ligeramente más lentas")
  132. (set #noclasses-message "El subdirectorio que seleccionó para sus clases ClassAct no forma parte de la asignación de LIBS:.\n\nEs necesario añadir esta asignación para que las clases puedan ser localizadas adecuadamente.")
  133. (set #creating-dir "Creando directorio ")
  134. (set #usbackup-prompt "Ahora se hará una copia de seguridad del User-Startup.")
  135. (set #usbackup-help "Este instalador hará ahora una modificación en el User-Startup. Antes de hacer esto se hará una copia de seguridad del User-Startup en S:User-Startup.old")
  136. (set #adding-1 "Añadiendo ")
  137. (set #adding-2 "a la asignación de LIBS:\n")
  138. (set #adding-help "Esto es necesario para que las clases puedan ser encontradas.")
  139. (set #junod-button "Parece que tiene el último button.gadget de Comodore ('V42') instalado en su sistema.\n\nEl button.gadget de ClassAct es superior a este gadget y le recomendamos que lo remplace. El button.gadget de ClassAct es compatible con el de Commodore. ¿Desea hacer una copia de seguridad del gadget de Commodore y remplazarlo por la versión de ClassAct?")
  140. (set #junod-backed "Se ha hecho una copia de seguridad del button.gadget 'V42' de Commodore con el nombre button.gadget.v42.\n\nEl button.gadget de ClassAct será instalado en su lugar.")
  141. (set #junod-kept "El button.gadget 'V42' de Commodore no fué remplazado con la versión superior de ClassAct.\n\nLos programas que dependan de la disponibilidad de las características de la versión de ClassAct funcionarán mal probablemente")
  142. ;(set #caprefs-message "CAPrefs es una pequeña utilidad que inicializa algunas preferencias del usuario para las aplicaciones ClassAct. Estas incluyen el estilo de resaltado (Fino/GadTools/Xen), relleno de ventanas, y detalles de las etiquetas de grupo.\n\nPor favor, use las preferencias de interface de ClassAct en su cajón de sistema 'Prefs' .\n\n")
  143. (set #caprefs-message "ClasAct tiene varios aspectos configurables por el usuario que afectan a la apariencia de las interfaces ClassAct.\n\nEstos ajustes pueden ser modificados usando la herramienta de preferencias de ClassAct que será instalada en su cajón 'Prefs'.\n\nUna pequeña herramienta, CAPrefs, será añadida a su user-startup para cargar los ajustes al arrancar.")
  144. (set #caprefs-startup-1 "Añadiendo el comando\n\n")
  145. (set #caprefs-startup-2 "\n\nA su s:User-Startup.")
  146. (set #decompressing-classact "Distribución de Classact comprimida detectada\n\nDescomprimiendo a RAM:")
  147. (set #deleteing-cltmp "Borrando ficheros temporales")
  148. )
  149. ; ENGLISH CLASSACT INSTALLATION STRINGS
  150. (
  151. (set #classdest-prompt "Please select the directory where you want the ClassAct classes installed.\n(See help for details)")
  152. (set #classdest-help (cat "ClassAct is a GUI toolkit consisting of shared BOOPSI classes.\n\nSome programs require some or all of the ClassAct classes installed on your system. "
  153.     (if v39 (cat "OS 3.0 has a standard directory for BOOPSI classes, the SYS:Classes directory. It is recommended that you install ClassAct there.")
  154.             (cat "OS 2.0 does not have a standard place for disk resident BOOPSI classes. On OS 3.0 these classes are stored in the SYS:Classes directory. It is recommended that you create this directory and install ClassAct there.\nThis directory must be added in the LIBS: assign. This can be done by placing the command\nAssign >NIL: LIBS: SYS:Classes ADD\nto User-Startup. This installer will do this for you.")
  155.         )
  156.     )
  157. )
  158. (set #classes-020 "Do you want to use the OS 3.0, 020 optimised version of ClassAct?")
  159. (set #help-020 "Some ClassAct libraries have versions optimised for use on 020 or better equipped OS 3.0 or later machines. If your Amiga is such equipped, you should install these. The 68000/2.0 versions will also work, but are slightly slower.")
  160. (set #noclasses-message "The directory you selected for your ClassAct classes is not a part of the LIBS: assign.\n\nIt is necessary to add this assign so that the classes will be found properly.")
  161. (set #creating-dir "Creating directory ")
  162. (set #usbackup-prompt "User-Startup will now be backed up.")
  163. (set #usbackup-help "This installer will next make a modification in User-Startup. Before doing this the old User-Startup will be backed up to S:User-Startup.old")
  164. (set #adding-1 "Adding ")
  165. (set #adding-2 " to LIBS: assign\n")
  166. (set #adding-help "This is necessary so that the custom classes can be found.")
  167. (set #junod-button "It seems you have a late Commodore 'V42' button.gadget installed on your system.\n\nClassAct's button.gadget is far more capable than this gadget, and we recommend that you replace it. The ClassAct button.gadget is backwards compatible to the Commodore gadget. Do you wish to back up the Commodore gadget and replace it with the ClassAct version?")
  168. (set #junod-backed "The Commodore 'V42' button.gadget has been backed up with the name button.gadget.v42.\n\nThe ClassAct button.gadget will be installed in its place.")
  169. (set #junod-kept "The Commodore 'V42' button.gadget was not replaced with the more capable ClassAct version.\n\nPrograms depending on the availability of ClassAct-only features will be likely to work wrong.")
  170. ;(set #caprefs-message "CAPrefs is a small utility that sets some user preferences for ClassAct applications. These include the bevel style (Thin/Gadtools/Xen), window backfills, and group label details.\n\nPlease use the ClassAct GUI prefs editor to alter the default settings provided. ClassAct prefs will be installed in your system Prefs drawer.\n\n")
  171. (set #caprefs-message "ClassAct has several user-configurable aspects that affect the look of ClassAct interfaces.\n\nThese settings can be changed using the ClassAct preferences tool that will be installed in yout Prefs drawer.\n\nA small tool, CAPrefs, will be added to your user-startup to load the settings on reboot.")
  172. (set #caprefs-startup-1 "Adding the command\n\n")
  173. (set #caprefs-startup-2 "\n\nTo your s:User-Startup.")
  174. (set #decompressing-classact "Compressed ClassAct distribution detected\n\nDecompressing to RAM:")
  175. (set #deleting-cltmp "Deleting temporary files")
  176. )
  177. )
  178.  
  179. (procedure install-classact
  180. ; call this procedure to copy the classes included in the Classes directory
  181. ; in your distribution dir.
  182.     (if (exists "ClassAct.lha")    ; ClassAct is compressed - need to decompress first
  183.         (                        ; Distribution includes LHEX
  184.             (working (cat #decompressing-classact))
  185. ; ClassAct.lha contains paths/files "Classes/*", "C/CheckAssign", "Prefs/CAPrefs" and "Prefs/ClassAct"
  186.             (run "lhex -aqfw=ram:ClassAct/ x ClassAct.lha")
  187.             (set @classact-source "RAM:ClassAct")
  188.         )
  189.         (set @classact-source (pathonly @icon))
  190.     )
  191.     (if (exists "ClassAct.lzx")    ; ClassAct is compressed - need to decompress first
  192.         (                        ; Distribution includes UNLZX
  193.             (working (cat #decompressing-classact))
  194. ; ClassAct.lzx contains paths/files "Classes/*", "C/CheckAssign",  "Prefs/CAPrefs" and "Prefs/ClassAct"
  195.             (run "unlzx -amq x ClassAct.lzx ram:ClassAct/")
  196.             (set @classact-source "RAM:ClassAct")
  197.         )
  198.         (set @classact-source (pathonly @icon))
  199.     )
  200.  
  201.     (if (exists (tackon @classact-source "Classes")) ; The archive contains a ClassAct library update.
  202.     (
  203.         (set comp-dest  (/ (* classact-complete 2) 10))
  204.         (set comp-libs  (/ (* classact-complete 3) 10))
  205.         (set comp-dirs  (/ (* classact-complete 4) 10))
  206.         (set comp-junod (/ (* classact-complete 5) 10))
  207.         (set comp-020   (/ (* classact-complete 6) 10))
  208.         (set comp-gad   (/ (* classact-complete 7) 10))
  209.         (set comp-im    (/ (* classact-complete 8) 10))
  210.         (set comp-prefs (/ (* classact-complete 9) 10))
  211.     
  212.         ; has the user installed ClassAct in CLASSACT: ?
  213.         (set @classact-dest (getassign "CLASSACT" "A"))
  214.         (if (= @classact-dest "") (set @classact-dest "SYS:Classes"))
  215.         
  216.         ; is ClassAct already in SYS:Classes ?
  217.         (if (or (not (exists (tackon @classact-dest "Gadgets/layout.gadget") (noreq)))
  218.                 (= @user-level 2))
  219.             ; no, ask where it should be placed
  220.             (set @classact-dest
  221.                 (askdir
  222.                     (prompt #classdest-prompt)
  223.                     (help #classdest-help)
  224.                     (default @classact-dest)
  225.                     (newpath)
  226.                 )
  227.             )
  228.         )
  229.         
  230.         (complete comp-dest)
  231.         
  232.         (if (<> (run (cat (tackon @classact-source "C/CheckAssign") " LIBS: " @classact-dest)) 0)
  233.             (
  234.                 (message #noclasses-message)
  235.                 (if (not (exists @classact-dest))
  236.                     (makedir @classact-dest (prompt (cat #creating-dir @classact-dest)))
  237.                 )
  238.                 (set @addassign (cat "Assign >NIL: LIBS: " @classact-dest " ADD\n"))
  239.                 (startup "CLASSACT"
  240.                     (command @addassign)
  241.                     (prompt (cat #adding-1 @classact-dest #adding-2))
  242.                     (help #adding-help)
  243.                 )
  244.                 (run (@addassign))
  245.             )
  246.         )
  247.         
  248.         (complete comp-libs)
  249.         
  250.         (set @classact-gadgets (tackon @classact-dest "Gadgets"))
  251.         (set @classact-images (tackon @classact-dest "Images"))
  252.         
  253.         (if (not (exists @classact-gadgets (noreq)))
  254.             (makedir @classact-images
  255.                 (prompt (cat #creating-dir @classact-gadgets))
  256.             )
  257.         )
  258.         
  259.         (if (not (exists @classact-images (noreq)))
  260.             (makedir @classact-images
  261.                 (prompt (cat #creating-dir @classact-images))
  262.             )
  263.         )
  264.         
  265.         (complete comp-dirs)
  266.         
  267.         (if (exists "SYS:Classes/Gadgets/button.gadget")
  268.             (if (and (= 2752514 (getversion "SYS:Classes/Gadgets/button.gadget"))
  269.                     (= 4868 (getsize "SYS:Classes/Gadgets/button.gadget")))
  270.                 (if (askbool (prompt #junod-button) (help @askbool-help) (default 1))
  271.                     (
  272.                         (rename "SYS:Classes/Gadgets/button.gadget" "SYS:Classes/Gadgets/button.gadget.v42")
  273.                         (message #junod-backed)
  274.                     )
  275.                     (message #junod-kept)
  276.                 )
  277.             )
  278.         )
  279.         
  280.         (complete comp-junod)
  281.         
  282.         (if (and (and cpu020 v39) (exists (tackon @classact-source "Classes/Gadgets/layout.gadget.020")))
  283.             (set classes-020 (askbool (prompt #classes-020) (help #help-020) (default 1)))
  284.             (set classes-020 0)
  285.         )
  286.  
  287.         (complete comp-020)
  288.         
  289.         (set @source-path (tackon @classact-source "Classes/Gadgets"))
  290.         (foreach @source-path "#?.gadget"
  291.             (
  292.                 (set thislib (tackon @source-path @each-name))
  293.                 (if (and classes-020 (exists (cat thislib ".020")))
  294.                     (set thislib (cat thislib ".020"))
  295.                 )
  296.                 (copylib (source thislib)
  297.                     (dest @classact-gadgets)
  298.                     (newname @each-name)
  299.                     (prompt (cat #installing @each-name))
  300.                     (help #classdest-help)
  301.                     (optional "force" "askuser")
  302.                 )
  303.             )
  304.         )
  305.         
  306.         (complete comp-gad)
  307.         
  308.         (set @source-path (tackon @classact-source "Classes/Images"))
  309.         (foreach @source-path "#?.image"
  310.             (
  311.                 (set thislib (tackon @source-path @each-name))
  312.                 (if (and classes-020 (exists (cat thislib ".020")))
  313.                     (set thislib (cat thislib ".020"))
  314.                 )
  315.                 (copylib (source thislib)
  316.                     (dest @classact-images)
  317.                     (newname @each-name)
  318.                     (prompt (cat #installing @each-name))
  319.                     (help #classdest-help)
  320.                     (optional "force" "askuser")
  321.                 )
  322.             )
  323.         )
  324.         
  325.         (complete comp-im)
  326.  
  327.         (set @source-path (tackon @classact-source "Classes"))
  328.         (foreach @source-path "#?.class"
  329.             (
  330.                 (set thislib (tackon @source-path @each-name))
  331.                 (if (and classes-020 (exists (cat thislib ".020")))
  332.                     (set thislib (cat thislib ".020"))
  333.                 )
  334.                 (copylib (source thislib)
  335.                     (dest @classact-dest)
  336.                     (newname @each-name)
  337.                     (prompt (cat #installing @each-name))
  338.                     (help #classdest-help)
  339.                     (optional "force" "askuser")
  340.                 )
  341.             )
  342.         )
  343.     )
  344.     )
  345.     (if (exists (tackon @classact-source "Prefs/ClassAct")) ; The archive contains ClassAct prefs tools
  346.     (
  347.         (message #caprefs-message)
  348.         
  349.         (copylib (source (tackon @classact-source "Prefs/CAPrefs")) 
  350.             (dest "C:") 
  351.             (prompt (cat #installing "CAPrefs"))
  352.         )
  353.         (copylib (source (tackon @classact-source "Prefs/ClassAct"))
  354.             (dest "SYS:Prefs")
  355.             (prompt (cat #installing "ClassAct Prefs"))
  356.             (infos)
  357.         )
  358.         
  359.         (complete comp-prefs)
  360.         
  361.         (if (not (exists "ENVARC:ClassAct" (noreq)))
  362.             (
  363.                 (makedir "ENVARC:ClassAct"
  364.                     (prompt (cat #creating-dir "ENVARC:ClassAct"))
  365.                 )
  366.                 (textfile (dest "ENVARC:ClassAct/ClassAct")
  367.                     (append "")
  368.                 )
  369.             )
  370.         )
  371.         (set caprefs-cmd "C:CAPrefs >NIL:\n")
  372.  
  373.         (startup "CAPREFS"
  374.             (prompt (cat #caprefs-startup-1 caprefs-cmd #caprefs-startup-2))
  375.             (help #caprefs-message)
  376.             (command caprefs-cmd)
  377.         )
  378.     )
  379.     )
  380.     
  381.     (if (or (exists "ClassAct.lha") (exists "ClassAct.lzx"))
  382.         (run "C:Delete RAM:ClassAct ALL"
  383.             (prompt #deleting-cltmp)
  384.         )
  385.     )
  386.  
  387.     (complete classact-complete)
  388. )
  389.  
  390. ; ************** END OF CLASSACT INSTALL PROCEDURE. COPY THE BLOCK ABOVE
  391. ; ************** TO YOUR CLASSACT APPLICATION INSTALLER.
  392.  
  393. ; ---------------------------------------------------------------------------
  394. (procedure set_dl_dir
  395.     (set DL_Dir (expandpath DL_Dir))
  396.     
  397.     ; verify that the download directory exists
  398.     (if (<> (exists DL_Dir) is_a_dir)
  399.         (
  400.             (makedir DL_Dir
  401.                 (prompt
  402.                     "The directory you have selected for download "
  403.                     "directory does not seem to exist.\n\n"
  404.                     "Do you want it to be created for you?")
  405.                 (help @makedir-help)
  406.                 (infos)
  407.                 (confirm)
  408.             )
  409.         )
  410.     )
  411.     (if (<> DL_Dir "")
  412.         (if (= (exists DL_Dir) is_a_dir)
  413.             (
  414.                 (set dlstr (cat dlstr "sys:rexxc/rx THOR:rexx/bbsread/cfgglobal.br DNL " quote DL_Dir quote))
  415.                 (run dlstr)
  416.                 (run dlstr)
  417.             )
  418.         )
  419.     )
  420.     (if (patmatch '#? #?' DL_Dir)
  421.         (set dldirproblem 1)
  422.     )
  423. )
  424.  
  425. (procedure set_ul_dir
  426.     (set UL_Dir (expandpath UL_Dir))
  427.     
  428.     ; verify that the upload directory exists
  429.     (if (<> (exists UL_Dir) is_a_dir)
  430.         (
  431.             (makedir UL_Dir
  432.                 (prompt
  433.                     "The directory you have selected for upload of "
  434.                     "reply packets does not seem to exist.\n\n"
  435.                     "Do you want it to be created for you?")
  436.                 (help @makedir-help)
  437.                 (infos)
  438.                 (confirm)
  439.             )
  440.         )
  441.     )
  442.     (if (<> UL_Dir "")
  443.         (if (= (exists UL_Dir) is_a_dir)
  444.             (
  445.                 (set ulstr (cat ulstr "sys:rexxc/rx THOR:rexx/bbsread/cfgglobal.br UPL " quote UL_Dir quote))
  446.                 (run ulstr)
  447.             )
  448.         )
  449.     )
  450. )
  451.  
  452. (procedure P_parsemail #system
  453.     (working 'Adding tutorial mail....')
  454.     (run (cat "Thor:bin/ParseUUCP " quote #system quote " GRAB Thor_Install:MIMEmail DELETE"))
  455. )
  456.  
  457. (procedure create_inet_system
  458.     (set systemname
  459.         (askstring
  460.             (prompt 
  461.                     "Please enter the name of the Internet system. "
  462.                     "This is the name used internally in THOR. ")
  463.             (help "This information is needed to configure a new system "
  464.                     "for use in THOR. ")
  465.             (default "Internet")
  466.         )
  467.     )
  468.     (set UserName
  469.         (if (exists 'ENV:USERNAME' (noreq))
  470.             (getenv 'USERNAME')
  471.             (if (exists 'ENV:USER' (noreq))
  472.                 (getenv 'USER')
  473.                 'username'
  474.             )
  475.         )
  476.     )
  477.     (set UserName
  478.         (askstring
  479.             (prompt "If you get mail using SMTPd or a similar program, "
  480.                     "please enter your user name now (which is also "
  481.                     "the name of the mailfile). If you want to use "
  482.                     "THOR's POP client for collecting mail, you can "
  483.                     "leave this blank.")
  484.             (help "This information is only needed if you get mail "
  485.                     "by some other means than the method THOR supports "
  486.                     "(eg. using SMTPd).")
  487.             (default UserName)
  488.         )
  489.     )
  490.     (if (= UserName "")
  491.         ( ; Then
  492.             (set sysstr (cat sysstr "sys:rexxc/rx THOR:rexx/bbsread/cfgbbs.br BBSNAME " quote systemname quote " TYPE TCP"))
  493.         )
  494.         ( ; Else
  495.             (set sysstr (cat sysstr "sys:rexxc/rx THOR:rexx/bbsread/cfgbbs.br BBSNAME " quote systemname quote " GRAB " quote UserName quote " TYPE TCP"))
  496.         )
  497.     )
  498.     (run sysstr)
  499.     (P_parsemail systemname)
  500. )
  501.  
  502. (procedure P_executescript #script
  503.     (set failed (execute #script))
  504.     (while (<> 0 failed)
  505.         (
  506.             (set fail_text (cat "Failed to execute the script "#script".\nWill try again."))
  507.             (message fail_text)
  508.             (set failed (execute #script))
  509.         )
  510.     )
  511. )
  512.  
  513. ;**************************************
  514. ;****** Install filetype icons ********
  515. ;**************************************
  516.  
  517. (procedure P_install-filetypes
  518.     (makedir "Thor:Filetypes" (infos))
  519.  
  520.     (set icon
  521.         (askchoice
  522.             (prompt
  523.                 "Please select what icon set THOR will use internally on MIME attachments.\n"
  524.                 "(we recommand that you select normal icons unless you run more than 8 colours "
  525.                 "on the THOR screen).")
  526.             (help
  527.                 "If you use MagicWB on your Workbench, "
  528.                 "you might want to install the special MagicWB icons.\n\n"
  529.                 "Likewise, if you use NewIcons on your Workbench, "
  530.                 "you might want to install the special NewIcons icons.")
  531.             (choices "Normal icons" "Small MagicWB icons" "MagicWB icons" "NewIcons icons")
  532.             (default 0)
  533.         )
  534.     )
  535.     (if (= icon 0)
  536.         (
  537.             (copyfiles
  538.                 (prompt "Copying Normal filetype icons...")
  539.                 (source "Thor_Install:FiletypesNORMAL")
  540.                 (dest "Thor:filetypes")
  541.                 (pattern "#?")
  542.                 (noposition)
  543.                 (nogauge)
  544.             )
  545.         )
  546.     )
  547.     (if (= icon 1)
  548.         (
  549.             (copyfiles
  550.                 (prompt "Copying small MagicWB filetype icons...")
  551.                 (source "Thor_Install:FiletypesMWBsmall")
  552.                 (dest "Thor:filetypes")
  553.                 (pattern "#?")
  554.                 (noposition)
  555.                 (nogauge)
  556.             )
  557.         )
  558.     )
  559.     (if (= icon 2)
  560.         (
  561.             (copyfiles
  562.                 (prompt "Copying MagicWB filetype icons...")
  563.                 (source "Thor_Install:Filetypes")
  564.                 (dest "Thor:filetypes")
  565.                 (pattern "#?")
  566.                 (noposition)
  567.                 (nogauge)
  568.             )
  569.         )
  570.     )
  571.     (if (= icon 3)
  572.         (
  573.             (copyfiles
  574.                 (prompt "Copying NewIcon filetype icons...")
  575.                 (source "Thor_Install:FiletypesNI")
  576.                 (dest "Thor:filetypes")
  577.                 (pattern "#?")
  578.                 (noposition)
  579.                 (nogauge)
  580.             )
  581.         )
  582.     )
  583.     ;*****************************
  584.     ;*** Set default viewers *****
  585.     ;*****************************
  586.  
  587.     (set picviewer
  588.         (askstring
  589.             (prompt
  590.                 "Please type the name (with full path, if needed) "
  591.                 "of the picture viewer you will use as external viewer of attached "
  592.                 "pictures in Thor. If left blank, Multiview will be used.")
  593.             (help "External picture viewer to be used in Thor.")
  594.             (default "")
  595.         )
  596.     )
  597.     (if (<> picviewer "")
  598.         ( ; Then
  599.             (tooltype 
  600.                 (dest "Thor:Filetypes/def_picture")
  601.                 (setdefaulttool picviewer)
  602.             )
  603.         )
  604.     )
  605.     (set animviewer
  606.         (askstring
  607.             (prompt
  608.                 "Please type the name (with full path, if needed) "
  609.                 "of the animation viewer you will use as external viewer of attached "
  610.                 "animations in Thor. If left blank, Multiview will be used.")
  611.             (help "External animation viewer to be used in Thor.")
  612.             (default "")
  613.         )
  614.     )
  615.     (if (<> animviewer "")
  616.         ( ; Then
  617.             (tooltype 
  618.                 (dest "Thor:Filetypes/def_anim")
  619.                 (setdefaulttool animviewer)
  620.             )
  621.         )
  622.     )
  623.     (set soundplayer
  624.         (askstring
  625.             (prompt
  626.                 "Please type the name (with full path, if needed) "
  627.                 "of the sound player you will use as external player of attached "
  628.                 "sounds in Thor. If left blank, Multiview will be used.")
  629.             (help "External sound player to be used in Thor.")
  630.             (default "")
  631.         )
  632.     )
  633.     (if (<> soundplayer "")
  634.         ( ; Then
  635.             (tooltype 
  636.                 (dest "Thor:Filetypes/def_sound")
  637.                 (setdefaulttool soundplayer)
  638.             )
  639.         )
  640.     )
  641.     (set textviewer
  642.         (askstring
  643.             (prompt
  644.                 "Please type the name (with full path, if needed) "
  645.                 "of the text viewer you will use as external viewer of attached "
  646.                 "text files in Thor. If left blank, Multiview will be used.")
  647.             (help "External text viewer to be used in Thor.")
  648.             (default "")
  649.         )
  650.     )
  651.     (if (<> textviewer "")
  652.         ( ; Then
  653.             (tooltype 
  654.                 (dest "Thor:Filetypes/def_text")
  655.                 (setdefaulttool textviewer)
  656.             )
  657.         )
  658.     )
  659.     (set docviewer
  660.         (askstring
  661.             (prompt
  662.                 "Please type the name (with full path, if needed) "
  663.                 "of the documentation (eg. AmigaGuide ) viewer you will use as external viewer of attached "
  664.                 "documentation files in Thor. If left blank, Multiview will be used.")
  665.             (help "External documentation viewer to be used in Thor.")
  666.             (default "")
  667.         )
  668.     )
  669.     (if (<> docviewer "")
  670.         ( ; Then
  671.             (tooltype 
  672.                 (dest "Thor:Filetypes/def_doc")
  673.                 (setdefaulttool docviewer)
  674.             )
  675.         )
  676.     )
  677. )
  678.  
  679. (procedure WAITX (set X 1) ( (while (< X 100)  (set X (+ X 1)) )  ) )
  680.  
  681. (working (cat "\n\n\n\n\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  682. (working (cat "\n\n\n\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  683. (working (cat "\n\n\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  684. (working (cat "\n\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  685. (working (cat "\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  686. (working (cat "\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  687. (working (cat "\n\n\n\n\n\n\n"#version"")) (WAITX)
  688. (working (cat "\n\n\n\n\n\n"#version"")) (WAITX)
  689. (working (cat "\n\n\n\n\n"#version"")) (WAITX)
  690. (working (cat "\n\n\n\n"#version"")) (WAITX)
  691. (working (cat "\n\n\n"#version"")) (WAITX)
  692. (working (cat "\n\n"#version"")) (WAITX)
  693. (working (cat "\n\n"#version"")) (WAITX)
  694. (working (cat "\n"#version"")) (WAITX)
  695. (working (cat "\n"#version"")) (WAITX)
  696.  
  697. (working (cat "\n"#version"\n\n\n\n\n\n\n\n\n\n\n\nby")) (WAITX)
  698. (working (cat "\n"#version"\n\n\n\n\n\n\n\n\n\n\nby")) (WAITX)
  699. (working (cat "\n"#version"\n\n\n\n\n\n\n\n\n\nby")) (WAITX)
  700. (working (cat "\n"#version"\n\n\n\n\n\n\n\n\nby")) (WAITX)
  701. (working (cat "\n"#version"\n\n\n\n\n\n\n\nby")) (WAITX)
  702. (working (cat "\n"#version"\n\n\n\n\n\n\nby")) (WAITX)
  703. (working (cat "\n"#version"\n\n\n\n\n\nby")) (WAITX)
  704. (working (cat "\n"#version"\n\n\n\n\nby")) (WAITX)
  705. (working (cat "\n"#version"\n\n\n\nby")) (WAITX)
  706. (working (cat "\n"#version"\n\n\nby")) (WAITX)
  707. (working (cat "\n"#version"\n\n\nby")) (WAITX)
  708.  
  709. (working (cat "\n"#version"\n\n\nby\n\n\n\n\n\n\n\n\nUltima Thule Software")) (WAITX) 
  710. (working (cat "\n"#version"\n\n\nby\n\n\n\n\n\n\n\nUltima Thule Software")) (WAITX) 
  711. (working (cat "\n"#version"\n\n\nby\n\n\n\n\n\n\nUltima Thule Software")) (WAITX) 
  712. (working (cat "\n"#version"\n\n\nby\n\n\n\n\n\nUltima Thule Software")) (WAITX) 
  713. (working (cat "\n"#version"\n\n\nby\n\n\n\n\nUltima Thule Software")) (WAITX) 
  714. (working (cat "\n"#version"\n\n\nby\n\n\n\nUltima Thule Software")) (WAITX) 
  715. (working (cat "\n"#version"\n\n\nby\n\n\nUltima Thule Software")) (WAITX) 
  716.  
  717. (message (cat "\n\n\n"#version"\n\n\nby\n\n\nUltima Thule Software")) (WAITX) 
  718.  
  719. (welcome)
  720.  
  721. ; first reset the user level so that the novice can see what's going on
  722. (save_default_level)
  723. (expert_level)
  724.  
  725. ;Make assign to install from
  726. (makeassign "Thor_Install" "" (safe))
  727.  
  728.  
  729. ;******************
  730. ;** Check Memory **
  731. ;******************
  732.  
  733. (run "Avail flush")
  734.  
  735. (set Running (run "Thor_Install:CheckForLib"))
  736.  
  737. (while (= Running 20)
  738.       (
  739.         (Message newline "Thor seem to be running, you MUST close it NOW."    
  740.                 newline "If you don't, the installation will fail!")
  741.         (run "Avail flush")
  742.         (set Running (run "Thor_Install:CheckForLib"))
  743.     )
  744. )
  745.  
  746. ;************************
  747. ;** Start Installation **
  748. ;************************
  749.  
  750. (if (exists "Thor:libs/bbsread.library" (noreq))
  751.     ( ; Then
  752.         (set end_text "Please use the UpdateThor script to\nupdate your already installed THOR.")
  753.         (abort end_text)
  754.     )
  755. )
  756.  
  757. (if (exists "BBSData:global.config" (noreq))
  758. ; Then
  759.     ((set end_text "Please use the UpdateThor script to\nupdate your already installed THOR.")
  760.     (abort end_text))
  761. )
  762.  
  763. (if (exists "envarc:THOR/BBSDataPath" (noreq))
  764.     (
  765.         (if    (askbool
  766.                    (prompt 
  767.                         "THOR seems to be already installed, "
  768.                         "do you want to install it again from scratch?")
  769.                 (help 
  770.                         "The installer script has found a previous "
  771.                         "installation of THOR.\n\n"
  772.                         "Select YES if you want it install again, otherwise NO")
  773.                 (default 1)
  774.             )
  775.             ; Then
  776.             (
  777.                 (delete "envarc:thor" (all))
  778.                 (delete "env:thor" (all))
  779.                 (run "delete env:thor all force")
  780.                 (run "delete envarc:thor all force")
  781.             )
  782.             ; Else
  783.             (
  784.                 (set end_text "Please use the UpdateThor script to\nupdate your already installed THOR.")
  785.                 (abort end_text)
  786.             )
  787.         )
  788.     )
  789. )
  790.  
  791. (set Thor_Dir 
  792.     (askdir
  793.         (prompt "Where would you like Thor installed?"
  794.         newline "The installer will create a 'Thor' directory in it.")
  795.         (help @askdir-help)
  796.         (default "Work:")
  797.         (newpath)
  798.     )
  799. )
  800. (set Thor_Dir (tackon (expandpath Thor_Dir) "Thor"))
  801.  
  802. ; before we go on lets reset the user's level back to what it was
  803. (default_level)
  804.  
  805. ; create the dir
  806. (makedir Thor_Dir (infos))
  807.  
  808. ; Create directories for the THOR installation
  809.  
  810. (makeassign "Thor" Thor_dir)
  811. (makedir "Thor:Data")
  812. (makeassign "BBSData" "Thor:data")
  813.  
  814. ;***********************************
  815. ;***** GET FIRST DISK IN HERE ******
  816. ;***********************************
  817.  
  818. ; first copy over the stuff
  819. (working #omp "Decompressing and copying Thor files.")
  820.  
  821. (run "Thor_Install:lha -a x Thor_Install:thor.lha THOR:" )
  822.  
  823. ;************************
  824. ;**  Copy the keyfile  **
  825. ;************************
  826. (if (exists "Thor_Install:THOR.key" (noreq))
  827. ; Then
  828.     (copyfiles
  829.         (source "Thor_Install:THOR.key")
  830.         (dest "THOR:")
  831.         (nogauge)
  832.     )
  833. )
  834.         
  835. ;*****************************************
  836. ;**  Copy the default arexx macro file  **
  837. ;*****************************************
  838. (if (exists "Thor_Install:THOR.macros" (noreq))
  839. ; Then
  840.     (copyfiles
  841.         (source "Thor_Install:THOR.macros")
  842.         (dest "THOR:")
  843.         (nogauge)
  844.     )
  845. )
  846.  
  847. (default_level)
  848.         
  849. ;***********************************
  850. ; Create the environment variables *
  851. ;***********************************
  852.  
  853. (set Running (run "Thor:bin/basemanager convert"))
  854. (if (<> 0 Running)
  855.     (
  856.         ((set end_text "Basemanager failed in setting up the env-variables.")
  857.         (abort end_text))
  858.     )
  859. )
  860.  
  861. ;******************
  862. ;** Locale stuff **
  863. ;******************
  864.  
  865. (default_level)
  866.  
  867. (set catalog
  868.    (askoptions
  869.       (prompt "What languages would you like to install ?\n"
  870.             "English is the built-in language.")
  871.       (help
  872.             "This will install locale files for other languages than English. "
  873.             "You can set the prefered language on Workbench and in Thor by"
  874.             "using the Sys:Prefs/Locale tool." newline @askchoice-help
  875.       )
  876.       (choices "Norsk" "Dansk" "Svenska" "Deutsch" "Français" "Italiano" "Nederlands" "Català" "Srpski" "Soumi")
  877.       (default 0)
  878.    )
  879. )
  880.  
  881. (makedir "thor:catalogs")
  882.  
  883. (if (bitand 1 catalog)
  884.     (copyfiles
  885.         (source "Thor_Install:catalogs/norsk")
  886.         (dest "thor:catalogs/norsk")
  887.         (all)
  888.     )
  889. )
  890.  
  891. (if (bitand 2 catalog)
  892.     (copyfiles
  893.         (source "Thor_Install:catalogs/dansk")
  894.         (dest "thor:catalogs/dansk")
  895.         (all)
  896.     )
  897. )
  898.  
  899. (if (bitand 4 catalog)
  900.     (copyfiles
  901.         (source "Thor_Install:catalogs/svenska")
  902.         (dest "thor:catalogs/svenska")
  903.         (all)
  904.     )
  905. )
  906.  
  907. (if (bitand 8 catalog)
  908.     (copyfiles
  909.         (source "Thor_Install:catalogs/deutsch")
  910.         (dest "thor:catalogs/deutsch")
  911.         (all)
  912.     )
  913. )
  914.  
  915. (if (bitand 16 catalog)
  916.     (copyfiles
  917.         (source "Thor_Install:catalogs/français")
  918.         (dest "thor:catalogs/français")
  919.         (all)
  920.     )
  921. )
  922.  
  923. (if (bitand 32 catalog)
  924.     (copyfiles
  925.         (source "Thor_Install:catalogs/italiano")
  926.         (dest "thor:catalogs/italiano")
  927.         (all)
  928.     )
  929. )
  930.  
  931. (if (bitand 64 catalog)
  932.     (copyfiles
  933.         (source "Thor_Install:catalogs/nederlands")
  934.         (dest "thor:catalogs/nederlands")
  935.         (all)
  936.     )
  937. )
  938.  
  939. (if (bitand 128 catalog)
  940.     (copyfiles
  941.         (source "Thor_Install:catalogs/català")
  942.         (dest "thor:catalogs/català")
  943.         (all)
  944.     )
  945. )
  946.  
  947. (if (bitand 256 catalog)
  948.     (copyfiles
  949.         (source "Thor_Install:catalogs/srpski")
  950.         (dest "thor:catalogs/srpski")
  951.         (all)
  952.     )
  953. )
  954.  
  955. (if (bitand 512 catalog)
  956.     (copyfiles
  957.         (source "Thor_Install:catalogs/suomi")
  958.         (dest "thor:catalogs/suomi")
  959.         (all)
  960.     )
  961. )
  962.  
  963. ;*********************
  964. ;** reqtools.libary **
  965. ;*********************
  966.  
  967. (copylib
  968.     (prompt "Copying ReqTools library")
  969.     (help "This will copy the ReqTools library." newline @copylib-help)
  970.     (source "Thor_Install:reqtools.library")
  971.     (dest "libs:")
  972.     (confirm)
  973. )
  974.  
  975. ;***********
  976. ;** Fonts **
  977. ;***********
  978.     
  979. (copyfiles
  980.     (prompt "Choose the fonts to install with Thor" newline "These are not required for Thor to run" )
  981.     (help "This will copy the default font files for Thor." newline @copyfiles-help)
  982.     (source "Thor_Install:Fonts")
  983.     (dest "Fonts:")
  984.     (fonts)
  985.     (choices "Grn" "Thin609" "Thin611" "Thin711")
  986. )
  987.  
  988. ;**************************************
  989. ;* Install the bbsread database stuff *
  990. ;**************************************
  991.  
  992. (set failed (run "thor:bin/initarc"))
  993. (if (<> 0 failed)
  994.     (
  995.         ((set end_text "Installation failed.\nIf you received any error message,\nplease write this down and send us\na mail about the problem.")
  996.         (abort end_text))
  997.     )
  998. )
  999.  
  1000. (run "thor:bin/InitCharsets")
  1001.  
  1002. (expert_level)
  1003.  
  1004. (set defpath (pathonly @icon))
  1005.  
  1006. (if    (askbool
  1007.         (prompt newline 
  1008.                         "Would you like to install the optional ARexx "
  1009.                         "scripts for THOR? "
  1010.         (help newline
  1011.                         "This section of the installation is dedicated "
  1012.                         "to installation of some optional ARexx scripts.\n\n "
  1013.                         "Select YES if you want to continue with this "
  1014.                         "installation, otherwise NO"))
  1015.         (default 1)
  1016.     )
  1017.     ; Then 
  1018.     (
  1019.         (set isthere 20)
  1020.         (while (= 20 isthere)
  1021.             (set arexxfile 
  1022.                 (askfile
  1023.                     (prompt (cat  
  1024.                             "Please select the ARexx archive for "#version"\n"
  1025.                             "(Usually named '"#arexxpackname"').\n\n"
  1026.                             "It will be unarchived automatically."))
  1027.                     (help @askfile-help)
  1028.                     (default (tackon defpath #arexxpackname))
  1029.                 )
  1030.             )
  1031.             ; verify that the file exists
  1032.             (if (exists arexxfile)
  1033.                 (
  1034.                     (set isthere 0)
  1035.                     (set defpath (pathonly arexxfile))
  1036.                     (set runfile3 (cat runfile3 "Thor_Install:lha -a x " quote arexxfile quote " Thor:rexx/"))
  1037.                     (set failed (run runfile3))
  1038.                     (if (<> 0 failed)
  1039.                         (
  1040.                             ((set failed_text "Unarchiving of the ARexx archive failed.")
  1041.                                 (message end_text))
  1042.                         )
  1043.                     )
  1044.                 )
  1045.                 ; else
  1046.                 (
  1047.                     (if    (askbool
  1048.                                (prompt 
  1049.                                 "File doesn't exist.\n\nDo you want to try again?"
  1050.                                 (default 1)
  1051.                                 (help "YES to select the correct file, or NO to continue without installing this archive.")
  1052.                             )
  1053.                         )
  1054.                         ; Then
  1055.                         (
  1056.                             (set isthere 20)
  1057.                         )
  1058.                         ; Else
  1059.                         (
  1060.                             (set isthere 0)
  1061.                         )
  1062.                     )
  1063.                 )
  1064.             )
  1065.         )
  1066.     )
  1067. )
  1068.  
  1069. (if (exists "Thor_Install:bin/parseqwk" (noreq))
  1070.     ; Then
  1071.     (
  1072.         (set bbspack 1)
  1073.     )
  1074.     ; Else
  1075.     (
  1076.         (if    (askbool
  1077.                 (prompt newline 
  1078.                                 "Would you like to install the modules for "
  1079.                                 "QWK, Fido, Hippo, Bluewave, ABBS/MBBS and Omen "
  1080.                                 "to be used with Bulletin Board Systems?\n\n "
  1081.                                 "(you will be able to select which modules to "
  1082.                                 "install later in this installation procedure).")
  1083.                 (help newline
  1084.                                 "This section of the installation is dedicated "
  1085.                                 "to installation of some common formats "
  1086.                                 "required if you want to use THOR with BBSes.\n\n"
  1087.                                 "Select YES if you want to continue with this "
  1088.                                 "installation, otherwise NO")
  1089.                 (default 1)
  1090.             )
  1091.             ; Then 
  1092.             (
  1093.                 (set isthere 20)
  1094.                 (while (= 20 isthere)
  1095.                     (set bbsfile 
  1096.                         (askfile
  1097.                             (prompt (cat "Please select the BBS archive for "#version"\n"
  1098.                                     "(Usually named '"#bbspackname"').\n\n"
  1099.                                     "It will be unarchived automatically."))
  1100.                             (help @askfile-help)
  1101.                             (default (tackon defpath #bbspackname))
  1102.                         )
  1103.                     )
  1104.                     ; verify that the file exists
  1105.                     (if (exists bbsfile)
  1106.                         (
  1107.                             (set isthere 0)
  1108.                             (set defpath (pathonly bbsfile))
  1109.                             (set runfile (cat runfile "Thor_Install:lha -a x " quote bbsfile quote " Thor_Install:"))
  1110.                             (set failed (run runfile))
  1111.                             (if (<> 0 failed)
  1112.                                 (
  1113.                                     ((set failed_text "Unarchiving of the BBS archive failed.")
  1114.                                         (message end_text))
  1115.                                 )
  1116.                                 ; Else
  1117.                                 (
  1118.                                     (set bbspack 1)
  1119.                                 )
  1120.                             )
  1121.                         )
  1122.                         ; else
  1123.                         (
  1124.                             (if    (askbool
  1125.                                           (prompt 
  1126.                                         "File doesn't exist.\n\nDo you want to try again?"
  1127.                                         (default 1)
  1128.                                         (help "YES to select the correct file, or NO to continue without installing this archive.")
  1129.                                     )
  1130.                                 )
  1131.                                 ; Then
  1132.                                 (
  1133.                                     (set isthere 20)
  1134.                                 )
  1135.                                 ; Else
  1136.                                 (
  1137.                                     (set isthere 0)
  1138.                                 )
  1139.                             )
  1140.                         )
  1141.                     )
  1142.                 )
  1143.             )
  1144.         )
  1145.     )
  1146. )
  1147.  
  1148. (if (exists "Thor_Install:bin/gettcp" (noreq))
  1149.     ; Then
  1150.     (
  1151.         (set inetpack 1)
  1152.     )
  1153.     ; Else
  1154.     (
  1155.         (if    (askbool
  1156.                 (prompt newline 
  1157.                                 "Would you like to install the modules for "
  1158.                                 "UUCP, SOUP, NNTP, SMTP and POP3 "
  1159.                                 "to be used with Internet?\n\n"
  1160.                                 "(you will be able to select which modules to "
  1161.                                 "install later in this installation procedure).")
  1162.                 (help newline
  1163.                                 "This section of the installation is dedicated "
  1164.                                 "to installation of some common formats "
  1165.                                 "required if you want to use THOR with Internet.\n\n"
  1166.                                 "Select YES if you want to continue with this "
  1167.                                 "installation, otherwise NO")
  1168.                 (default 1)
  1169.             )
  1170.             ; Then 
  1171.             (
  1172.                 (set isthere 20)
  1173.                 (while (= 20 isthere)
  1174.                     (set inetfile 
  1175.                         (askfile
  1176.                             (prompt (cat  
  1177.                                     "Please select the Internet archive for "#version"\n"
  1178.                                     "(Usually named '"#inetpackname"').\n\n"
  1179.                                     "It will be unarchived automatically."))
  1180.                             (help @askfile-help)
  1181.                             (default (tackon defpath #inetpackname))
  1182.                         )
  1183.                     )
  1184.                     ; verify that the file exists
  1185.                     (if (exists inetfile)
  1186.                         (
  1187.                             (set isthere 0)
  1188.                             (set runfile2 (cat runfile2 "Thor_Install:lha -a x " quote inetfile quote " Thor_Install:"))
  1189.                             (set failed (run runfile2))
  1190.                             (if (<> 0 failed)
  1191.                                 (
  1192.                                     ((set failed_text "Unarchiving of the Internet archive failed.")
  1193.                                         (message end_text))
  1194.                                 )
  1195.                                 ; Else
  1196.                                 (
  1197.                                     (set inetpack 1)
  1198.                                 )
  1199.                             )
  1200.                         )
  1201.                         ; else
  1202.                         (
  1203.                             (if    (askbool
  1204.                                           (prompt 
  1205.                                         "File doesn't exist.\n\nDo you want to try again?"
  1206.                                         (default 1)
  1207.                                         (help "YES to select the correct file, or NO to continue without installing this archive.")
  1208.                                     )
  1209.                                 )
  1210.                                 ; Then
  1211.                                 (
  1212.                                     (set isthere 20)
  1213.                                 )
  1214.                                 ; Else
  1215.                                 (
  1216.                                     (set isthere 0)
  1217.                                 )
  1218.                             )
  1219.                         )
  1220.                     )
  1221.                 )
  1222.             )
  1223.         )
  1224.     )
  1225. )
  1226.  
  1227. (if (= bbspack 1)
  1228.     (
  1229.         (set bbs_type
  1230.            (askoptions
  1231.               (prompt
  1232.                         "Please select which BBS modules "
  1233.                         "you want to install.")
  1234.               (help
  1235.                     "What system type for BBS usage that should be "
  1236.                     "installed can be selected here."
  1237.               )
  1238.  
  1239.               (choices
  1240.                     "QWK        - Normal QWK"
  1241.                     "Fido       - Normal Fidonet"
  1242.                     "BlueWave   - Normal BlueWave"
  1243.                     "ABBS       - Normal ABBS"
  1244.                     "ABBS_QWK   - ABBS with QWK support"
  1245.                     "MBBS       - Normal MBBS"
  1246.                     "Hippo/BBBS - Normal Hippo V2 and Hippo on BBBS"
  1247.                     "Omen       - Normal Omen"
  1248.               )
  1249.               (default -1)
  1250.            )
  1251.         )
  1252.         (copyfiles
  1253.             (source "Thor_Install:scripts")
  1254.             (dest "THOR:scripts")
  1255.             (pattern "#?BBS#?")
  1256.         )
  1257.         (if (bitand 1 bbs_type)
  1258.             (
  1259.                 (copyfiles
  1260.                     (source "Thor_Install:bin")
  1261.                     (dest "THOR:bin")
  1262.                     (pattern "#?QWK")
  1263.                 )
  1264.                 (copyfiles
  1265.                     (source "Thor_Install:s/cfgqwk")
  1266.                     (dest "THOR:s")
  1267.                 )
  1268.                 (P_executescript "thor:s/cfgqwk")
  1269.             )
  1270.         )
  1271.         (if (bitand 2 bbs_type)
  1272.             (
  1273.                 (copyfiles
  1274.                     (source "Thor_Install:bin")
  1275.                     (dest "THOR:bin")
  1276.                     (pattern "#?FIDO")
  1277.                 )
  1278.                 (copyfiles
  1279.                     (source "Thor_Install:s")
  1280.                     (dest "THOR:s")
  1281.                     (pattern "cfgfido#?")
  1282.                 )
  1283.                 (P_executescript "thor:s/cfgfido")
  1284.                 (P_executescript "thor:s/cfgfido_export")
  1285.             )
  1286.         )
  1287.         (if (bitand 4 bbs_type)
  1288.             (
  1289.                 (copyfiles
  1290.                     (source "Thor_Install:bin")
  1291.                     (dest "THOR:bin")
  1292.                     (pattern "#?BLUE")
  1293.                 )
  1294.                 (copyfiles
  1295.                     (source "Thor_Install:s/cfgblue")
  1296.                     (dest "THOR:s")
  1297.                 )
  1298.                 (P_executescript "thor:s/cfgblue")
  1299.             )
  1300.         )
  1301.         (if (bitand 8 bbs_type)
  1302.             (
  1303.                 (copyfiles
  1304.                     (source "Thor_Install:bin/packambbs")
  1305.                     (dest "THOR:bin")
  1306.                 )
  1307.                 (copyfiles
  1308.                     (source "Thor_Install:bin/parsemsg")
  1309.                     (dest "THOR:bin")
  1310.                 )
  1311.                 (copyfiles
  1312.                     (source "Thor_Install:s/cfgabbs")
  1313.                     (dest "THOR:s")
  1314.                 )
  1315.                 (P_executescript "thor:s/cfgabbs")
  1316.             )
  1317.         )
  1318.         (if (bitand 16 bbs_type)
  1319.             (
  1320.                 (copyfiles
  1321.                     (source "Thor_Install:bin")
  1322.                     (dest "THOR:bin")
  1323.                     (pattern "#?QWK")
  1324.                 )
  1325.                 (copyfiles
  1326.                     (source "Thor_Install:s/cfgabbs_qwk")
  1327.                     (dest "THOR:s")
  1328.                 )
  1329.                 (P_executescript "thor:s/cfgabbs_qwk")
  1330.             )
  1331.         )
  1332.         (if (bitand 32 bbs_type)
  1333.             (
  1334.                 (copyfiles
  1335.                     (source "Thor_Install:bin/packambbs")
  1336.                     (dest "THOR:bin")
  1337.                 )
  1338.                 (copyfiles
  1339.                     (source "Thor_Install:bin/parsemsg")
  1340.                     (dest "THOR:bin")
  1341.                 )
  1342.                 (copyfiles
  1343.                     (source "Thor_Install:s/cfgmbbs")
  1344.                     (dest "THOR:s")
  1345.                 )
  1346.                 (P_executescript "thor:s/cfgmbbs")
  1347.             )
  1348.         )
  1349.         (if (bitand 64 bbs_type)
  1350.             (
  1351.                 (copyfiles
  1352.                     (source "Thor_Install:bin")
  1353.                     (dest "THOR:bin")
  1354.                     (pattern "#?hippo")
  1355.                 )
  1356.                 (copyfiles
  1357.                     (source "Thor_Install:s/cfghippo")
  1358.                     (dest "THOR:s")
  1359.                 )
  1360.                 (copyfiles
  1361.                     (source "Thor_Install:s/cfgbbbs")
  1362.                     (dest "THOR:s")
  1363.                 )
  1364.                 (P_executescript "thor:s/cfghippo")
  1365.                 (P_executescript "thor:s/cfgbbbs")
  1366.             )
  1367.         )
  1368.         (if (bitand 128 bbs_type)
  1369.             (
  1370.                 (copyfiles
  1371.                     (source "Thor_Install:bin")
  1372.                     (dest "THOR:bin")
  1373.                     (pattern "#?omen")
  1374.                 )
  1375.                 (copyfiles
  1376.                     (source "Thor_Install:s/cfgomen")
  1377.                     (dest "THOR:s")
  1378.                 )
  1379.                 (P_executescript "thor:s/cfgomen")
  1380.             )
  1381.         )
  1382.     )
  1383. )
  1384.  
  1385. (if (= inetpack 1)
  1386.     (
  1387.         (set bbs_type
  1388.            (askoptions
  1389.               (prompt
  1390.                         "Please select which Internet modules "
  1391.                         "you want to install.")
  1392.               (help
  1393.                     "What system type for Internet usage that should be "
  1394.                     "installed can be selected here."
  1395.               )
  1396.  
  1397.               (choices
  1398.                         "TCP/TCP_ONLINE - POP3, SMTP and NNTP"
  1399.                         "SOUP/UQWK_SOUP - Normal SOUP and SOUP w/uqwk"
  1400.                         "UUCP           - Normal UUCP"
  1401.               )
  1402.               (default -1)
  1403.            )
  1404.         )
  1405.  
  1406.         (copyfiles
  1407.             (source "Thor_Install:libs/utnet.library")
  1408.             (dest "THOR:libs")
  1409.         )
  1410.  
  1411.         (copyfiles
  1412.             (source "Thor_Install:bin/InitRFC")
  1413.             (dest "THOR:bin")
  1414.         )
  1415.  
  1416.         (copyfiles
  1417.             (source "Thor_Install:scripts")
  1418.             (dest "THOR:scripts")
  1419.             (pattern "#?UQWK#?")
  1420.         )
  1421.  
  1422.         (if (bitand 1 bbs_type)
  1423.             (
  1424.                 (copyfiles
  1425.                     (source "Thor_Install:bin")
  1426.                     (dest "THOR:bin")
  1427.                     (pattern "#?(UUCP|TCP)")
  1428.                 )
  1429.                 (copyfiles
  1430.                     (source "Thor_Install:")
  1431.                     (dest "THOR:")
  1432.                     (pattern "ConnectTHOR#?")
  1433.                 )
  1434.                 (copyfiles
  1435.                     (source "Thor_Install:s/cfgtcp")
  1436.                     (dest "THOR:s")
  1437.                 )
  1438.                 (copyfiles
  1439.                     (source "Thor_Install:s/cfgtcp_online")
  1440.                     (dest "THOR:s")
  1441.                 )
  1442.                 (P_executescript "thor:s/cfgtcp")
  1443.                 (P_executescript "thor:s/cfgtcp_online")
  1444.                 (set tcptype 1)
  1445.             )
  1446.         )
  1447.         (if (bitand 2 bbs_type)
  1448.             (
  1449.                 (copyfiles
  1450.                     (source "Thor_Install:bin")
  1451.                     (dest "THOR:bin")
  1452.                     (pattern "#?SOUP")
  1453.                 )
  1454.                 (copyfiles
  1455.                     (source "Thor_Install:s")
  1456.                     (dest "THOR:s")
  1457.                     (pattern "#?soup")
  1458.                 )
  1459.                 (makedir "THOR:unix")
  1460.                 (copyfiles
  1461.                     (source "Thor_Install:unix")
  1462.                     (dest "THOR:unix")
  1463.                     (all)
  1464.                 )
  1465.                 (P_executescript "thor:s/cfguqwk_soup")
  1466.                 (P_executescript "thor:s/cfgsoup")
  1467.             )
  1468.         )
  1469.         (if (bitand 4 bbs_type)
  1470.             (
  1471.                 (copyfiles
  1472.                     (source "Thor_Install:bin")
  1473.                     (dest "THOR:bin")
  1474.                     (pattern "#?UUCP")
  1475.                 )
  1476.                 (copyfiles
  1477.                     (source "Thor_Install:s/cfguucp")
  1478.                     (dest "THOR:s")
  1479.                 )
  1480.                 (P_executescript "thor:s/cfguucp")
  1481.                 (set uucptype 1)
  1482.             )
  1483.         )
  1484.     )
  1485. )
  1486.  
  1487. (install-classact)
  1488.  
  1489. ;*****************************
  1490. ;****** Install icons ********
  1491. ;*****************************
  1492.  
  1493. (set icon
  1494.     (askchoice
  1495.         (prompt
  1496.             "Please select what Workbench icon-set to install with THOR.\n")
  1497.         (help
  1498.             "If you use MagicWB on your Workbench, "
  1499.             "you might want to install the special MagicWB icons.\n\n"
  1500.             "Likewise, if you use NewIcons on your Workbench, "
  1501.             "you might want to install the special NewIcons icons.")
  1502.         (choices "Normal icons" "MagicWB icons" "NewIcons icons")
  1503.         (default 0)
  1504.     )
  1505. )
  1506.  
  1507. (if (= icon 0)
  1508.     (
  1509.         (copyfiles
  1510.             (prompt "Copying Normal icon files...")
  1511.             (source "Thor_Install:NormalIcons")
  1512.             (dest "Thor:")
  1513.             (pattern "~(THOR.guide.info)")
  1514.             (noposition)
  1515.             (nogauge)
  1516.         )
  1517.         (copyfiles
  1518.             (prompt "Copying Normal icon files...")
  1519.             (source "Thor_Install:NormalIcons/THOR.guide.info")
  1520.             (dest "Thor:Docs")
  1521.             (newname "THOR.guide.info")
  1522.             (noposition)
  1523.             (nogauge)
  1524.         )
  1525.         (copyfiles
  1526.             (prompt "Copying Normal icon files...")
  1527.             (source "Thor_Install:NormalIcons/THOR.guide.info")
  1528.             (dest "Thor:Docs")
  1529.             (newname "ConfigTHOR.guide.info")
  1530.             (noposition)
  1531.             (nogauge)
  1532.         )
  1533.         (copyfiles
  1534.             (prompt "Copying Normal icon files...")
  1535.             (source "Thor_Install:NormalIcons/THOR.guide.info")
  1536.             (dest "Thor:Docs")
  1537.             (newname "ARexx.guide.info")
  1538.             (noposition)
  1539.             (nogauge)
  1540.         )
  1541.         (copyfiles
  1542.             (prompt "Copying Normal icon files...")
  1543.             (source "Thor_Install:NormalIcons/THOR.guide.info")
  1544.             (dest "Thor:Docs")
  1545.             (newname "BBSReadRexx.guide.info")
  1546.             (noposition)
  1547.             (nogauge)
  1548.         )
  1549.         (copyfiles
  1550.             (prompt "Copying Normal icon files...")
  1551.             (source "Thor_Install:NormalIcons/THOR.guide.info")
  1552.             (dest "Thor:Docs")
  1553.             (newname "THOR_Rexx.guide.info")
  1554.             (noposition)
  1555.             (nogauge)
  1556.         )
  1557.         (copyfiles
  1558.             (prompt "Copying Normal icon files...")
  1559.             (source "Thor_Install:NormalIcons/THOR.guide.info")
  1560.             (dest "Thor:Docs")
  1561.             (newname "Installation.guide.info")
  1562.             (noposition)
  1563.             (nogauge)
  1564.         )
  1565.     )
  1566. )
  1567.  
  1568. (if (= icon 1)
  1569.     (
  1570.         (copyfiles
  1571.             (prompt "Copying MagicWB icon files...")
  1572.             (source "Thor_Install:MWBIcons")
  1573.             (dest "Thor:")
  1574.             (pattern "~(THOR.guide.info)")
  1575.             (noposition)
  1576.             (nogauge)
  1577.         )
  1578.         (copyfiles
  1579.             (prompt "Copying MagicWB icon files...")
  1580.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  1581.             (dest "Thor:Docs")
  1582.             (newname "THOR.guide.info")
  1583.             (noposition)
  1584.             (nogauge)
  1585.         )
  1586.         (copyfiles
  1587.             (prompt "Copying MagicWB icon files...")
  1588.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  1589.             (dest "Thor:Docs")
  1590.             (newname "ConfigTHOR.guide.info")
  1591.             (noposition)
  1592.             (nogauge)
  1593.         )
  1594.         (copyfiles
  1595.             (prompt "Copying MagicWB icon files...")
  1596.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  1597.             (dest "Thor:Docs")
  1598.             (newname "ARexx.guide.info")
  1599.             (noposition)
  1600.             (nogauge)
  1601.         )
  1602.         (copyfiles
  1603.             (prompt "Copying MagicWB icon files...")
  1604.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  1605.             (dest "Thor:Docs")
  1606.             (newname "BBSReadRexx.guide.info")
  1607.             (noposition)
  1608.             (nogauge)
  1609.         )
  1610.         (copyfiles
  1611.             (prompt "Copying MagicWB icon files...")
  1612.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  1613.             (dest "Thor:Docs")
  1614.             (newname "THOR_Rexx.guide.info")
  1615.             (noposition)
  1616.             (nogauge)
  1617.         )
  1618.         (copyfiles
  1619.             (prompt "Copying MagicWB icon files...")
  1620.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  1621.             (dest "Thor:Docs")
  1622.             (newname "Installation.guide.info")
  1623.             (noposition)
  1624.             (nogauge)
  1625.         )
  1626.     )
  1627. )
  1628. (if (= icon 2)
  1629.     (
  1630.         (copyfiles
  1631.             (prompt "Copying NewIcons icon files...")
  1632.             (source "Thor_Install:NewIcons")
  1633.             (dest "Thor:")
  1634.             (pattern "~(THOR.guide.info)")
  1635.             (noposition)
  1636.             (nogauge)
  1637.         )
  1638.         (copyfiles
  1639.             (prompt "Copying NewIcons icon files...")
  1640.             (source "Thor_Install:NewIcons/THOR.guide.info")
  1641.             (dest "Thor:Docs")
  1642.             (newname "THOR.guide.info")
  1643.             (noposition)
  1644.             (nogauge)
  1645.         )
  1646.         (copyfiles
  1647.             (prompt "Copying NewIcons icon files...")
  1648.             (source "Thor_Install:NewIcons/THOR.guide.info")
  1649.             (dest "Thor:Docs")
  1650.             (newname "ConfigTHOR.guide.info")
  1651.             (noposition)
  1652.             (nogauge)
  1653.         )
  1654.         (copyfiles
  1655.             (prompt "Copying NewIcons icon files...")
  1656.             (source "Thor_Install:NewIcons/THOR.guide.info")
  1657.             (dest "Thor:Docs")
  1658.             (newname "ARexx.guide.info")
  1659.             (noposition)
  1660.             (nogauge)
  1661.         )
  1662.         (copyfiles
  1663.             (prompt "Copying NewIcons icon files...")
  1664.             (source "Thor_Install:NewIcons/THOR.guide.info")
  1665.             (dest "Thor:Docs")
  1666.             (newname "BBSReadRexx.guide.info")
  1667.             (noposition)
  1668.             (nogauge)
  1669.         )
  1670.         (copyfiles
  1671.             (prompt "Copying NewIcons icon files...")
  1672.             (source "Thor_Install:NewIcons/THOR.guide.info")
  1673.             (dest "Thor:Docs")
  1674.             (newname "THOR_Rexx.guide.info")
  1675.             (noposition)
  1676.             (nogauge)
  1677.         )
  1678.         (copyfiles
  1679.             (prompt "Copying NewIcons icon files...")
  1680.             (source "Thor_Install:NewIcons/THOR.guide.info")
  1681.             (dest "Thor:Docs")
  1682.             (newname "Installation.guide.info")
  1683.             (noposition)
  1684.             (nogauge)
  1685.         )
  1686.     )
  1687. )
  1688.  
  1689. (if (not (exists "Thor:Filetypes" (noreq)))
  1690.     (P_install-filetypes)
  1691. )
  1692. ;*****************************
  1693. ;* Simple configuration here *
  1694. ;*****************************
  1695.  
  1696. (if (= tcptype 1)
  1697.     ; then
  1698.     (
  1699.         (if    (askbool
  1700.                 (prompt newline "The following section in this installation "
  1701.                         "is used for setting up parameters needed "
  1702.                         "for use of the TCP types (POP3/NNTP/SMTP) "
  1703.                         "for Internet mail and news. This configuration is optional "
  1704.                         "but must be set later if you do not do this now.\n\n"
  1705.                         "Do you want to proceed with this?")
  1706.                 (help #installtext)
  1707.                 (default 1)
  1708.             )
  1709.             ; Then 
  1710.             (
  1711.                 (set DL_Dir 
  1712.                         (askdir
  1713.                             (prompt
  1714.                                 "Select default download directory."
  1715.                                 "This directory will be used for BBS message packets and "
  1716.                                 "downloads, SMTPd mailboxes and saving of MIME/uuencoded "
  1717.                                 "binaries. It can be changed in ConfigTHOR later on."
  1718.                             (help @askdir-help)
  1719.                             (default "Work:")
  1720.                             (newpath)
  1721.                         )
  1722.                     )
  1723.                 )
  1724.                 (set_dl_dir)
  1725.                 (create_inet_system)
  1726.                 (if    (askbool
  1727.                         (prompt newline 
  1728.                                 "If you like to set up some parameters like your "
  1729.                                 "real name, newsserver, mailserver etc. you can "
  1730.                                 "do this now. "
  1731.                                 "Do you want to proceed with this?")
  1732.                         (help #installtext)
  1733.                            (default 1)
  1734.                     )
  1735.                     ; Then 
  1736.                     (
  1737.                         (set typecfg (cat typecfg "THOR:bin/cfgtcp " quote systemname quote))
  1738.                         (set running (run typecfg))
  1739.                         (if    (askbool
  1740.                                 (prompt newline 
  1741.                                         "Would you like to order a list of available newsgroups "
  1742.                                         "from the configured newsserver for the next time you "
  1743.                                         "connect?")
  1744.                                 (help #installtext)
  1745.                                    (default 1)
  1746.                             )
  1747.                             ; Then 
  1748.                             (
  1749.                                 (set ConfigConf (cat '\nCONFIGCONF BBSNAME ' tick '"' systemname '"' tick ' CONFNAME ' tick '"EMail"' tick))
  1750.                                 (set ConfList (cat 'WRITEBREVENT BBSNAME ' tick '"' systemname '"' tick ' EVENT EVE_CONFLIST\n'))
  1751.                                 (set adrcmd (cat 'address command 'quote'Thor:bin/LoadBBSRead'quote'\n'))
  1752.                                 (textfile
  1753.                                     (dest 't:getconflist.rexx')
  1754.                                     (append '/* Order a list of newsgroups */\n\n')
  1755.                                     (append adrcmd)
  1756.                                     (append 'WaitForPort BBSREAD\n')
  1757.                                     (append 'address BBSREAD\n')
  1758.                                     (append '\nEVE_CONFLIST = 6\n')
  1759.                                     (append ConfList)
  1760.                                     (append '\nGCF_IGNORE_KEEPMSG   = "00000001"x')
  1761.                                     (append '\nGCF_IGNORE_KEEPTIME  = "00000002"x')
  1762.                                     (append '\nGCF_ALWAYS_REPLY_STR = "00000100"x')
  1763.                                     (append '\nBDF_MARK_OWN_MSGS    = "00000080"x')
  1764.                                     (append '\nCDF_MEMBER_OF        = "00000001"x')
  1765.                                     (append '\nCDF_MAIL             = "00000002"x')
  1766.                                     (append '\nCDF_BBS_KEEPMSG      = "00000200"x')
  1767.                                     (append '\nCDF_BBS_KEEPTIME     = "00000400"x')
  1768.                                     (append '\nCDF_IGNORE_KEEPMSG   = "00000800"x')
  1769.                                     (append '\nCDF_IGNORE_KEEPTIME  = "00001000"x')
  1770.                                     (append '\nCDF_MARK_OWN_MSGS    = "00400000"x')
  1771.                                     (append '\nCDF_ALWAYS_REPLY_STR = "02000000"x')
  1772.                                     (append (cat ConfigConf ' REPLYSTRING ' tick '"Hello %N, on %D, you said,"' tick ' SET c2x(CDF_MARK_OWN_MSGS)'))
  1773.                                     (append (cat ConfigConf ' SET c2x(CDF_ALWAYS_REPLY_STR)'))
  1774.                                     (append (cat ConfigConf ' CLEAR c2x(CDF_BBS_KEEPTIME)'))
  1775.                                     (append (cat ConfigConf ' CLEAR c2x(CDF_BBS_KEEPMSG)'))
  1776.                                     (append (cat ConfigConf ' SET c2x(CDF_IGNORE_KEEPTIME)'))
  1777.                                     (append (cat ConfigConf ' SET c2x(CDF_IGNORE_KEEPMSG)'))
  1778.                                     (append (cat ConfigConf ' SET c2x(CDF_MEMBER_OF)'))
  1779.                                     (append (cat ConfigConf ' SET c2x(CDF_MAIL)'))
  1780.                                     (append '\n')
  1781.                                 )
  1782.                                 (if (<> 0 (run 'rx t:getconflist.rexx'))
  1783.                                     (run 'sys:rexxc/rx t:getconflist.rexx')
  1784.                                 )
  1785.                             )
  1786.                         )
  1787.                         (message #endtcpcfgtext)
  1788.                     )
  1789.                 )
  1790.             )
  1791.         )
  1792.     )
  1793.     ; else
  1794.     (
  1795.         (if    (askbool
  1796.                 (prompt newline "The following section in this installation "
  1797.                             "is used for setting up a download and an upload "
  1798.                             "directory for message packets.  This section is "
  1799.                             "optional, but the directories needs to be "
  1800.                             "set in THOR if you do not set them up here.\n\n"
  1801.                             "Do you want to proceed with this?")
  1802.                 (help #installtext)
  1803.                 (default 1)
  1804.             )
  1805.             ; Then 
  1806.             (
  1807.                 (set DL_Dir 
  1808.                     (askdir
  1809.                         (prompt "Where do you keep your downloaded message packets?\n\n"
  1810.                                 "This is usually the download directory "
  1811.                                 "configured in the communication program you "
  1812.                                 "use."
  1813.                             (help @askdir-help)
  1814.                             (default "Work:")
  1815.                             (newpath)
  1816.                         )
  1817.                     )
  1818.                 )
  1819.                 (set_dl_dir)
  1820.     
  1821.                 (set UL_Dir 
  1822.                     (askdir
  1823.                         (prompt "Where would you like to keep any reply "
  1824.                                 "message packets that THOR generates?\n\n"
  1825.                                 "This is usually the upload directory "
  1826.                                 "configured in your communication program."
  1827.                             (help @askdir-help)
  1828.                             (default "Work:")
  1829.                             (newpath)
  1830.                         )
  1831.                     )
  1832.                 )
  1833.                 (set_ul_dir)
  1834.             )
  1835.         )
  1836.     )
  1837. )
  1838.  
  1839. ;*****************************
  1840. ;***** WE ARE ALMOST DONE ****
  1841. ;*****************************
  1842.  
  1843. (if (> (exists ("sys:Utilities/more")) 0) (set #mcmd  "sys:Utilities/more") )
  1844. (if (> (exists ("c:multiview")) 0) (set #mcmd "c:multiview") )
  1845. (if (> (exists ("sys:Utilities/multiview")) 0) (set #mcmd  "sys:Utilities/multiview") )
  1846.  
  1847. (run (cat "run " #mcmd " THOR.readme") )
  1848.  
  1849. ; make sure that default-dir is pointing to the right place
  1850. (set @default-dest Thor_Dir)
  1851.     
  1852. (makeassign "Thor_Install")
  1853. (makeassign "BBSData")
  1854. (makeassign "Thor_Disk" (safe))
  1855.  
  1856. (if (= dldirproblem 1)
  1857.     (message (cat "There was a problem configuring the download directory.\n\n"
  1858.         "Please configure this manually in THOR."))
  1859. )
  1860.  
  1861. ; now for the exit
  1862. (exit #endtext)
  1863.  
  1864.